<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="customer" tagdir="/WEB-INF/tags/customer"%>
<%@ taglib prefix="order" tagdir="/WEB-INF/tags/order"%>
<td></td>
<td class="consignee" colspan="11">
	<div class="order_show">
		<div class="clearfix">
			<div class="hd">
				<div class="content">
					<span class="tt"><fmt:message key="order.handle"/>：<input type="hidden" id="orderNo${order.salesOrderId}" value="${order.orderNo}"/>
					</span>
					<div class="toolbar">
						<authorize:authorizeResource resourceString="/order/salesOrder/ajaxPage.html?doAction=edit*">
							<probiz:iconBtn btnType="unitiveBulkedit" id="edit${order.salesOrderId}" btnTextKey="salesOrder.button.edit"  onclick="editOrder(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=confirmOrder*">
							<probiz:iconBtn btnType="confirm" id="confirm${order.salesOrderId}" btnTextKey="salesOrder.button.confirm" onclick="confirmOrder(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=payOrder*">
							<probiz:iconBtn btnType="pay" id="pay${order.salesOrderId}" btnTextKey="salesOrder.button.pay" onclick="showPayPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=refundOrder*">
							<probiz:iconBtn btnType="refundment" id="refund${order.salesOrderId}" btnTextKey="salesOrder.button.refund" onclick="showRefundPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder.html?doAction=addOrderNo4PickPanel*">
							<probiz:iconBtn btnType="pick" id="pick${order.salesOrderId}" btnTextKey="salesOrder.button.pick" onclick="addSingleOrderNo4PickPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=shipOrder*">
							<probiz:iconBtn btnType="delivery" id="ship${order.salesOrderId}" btnTextKey="salesOrder.button.ship" onclick="showShipPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=returnOrder*">
							<probiz:iconBtn btnType="return" id="return${order.salesOrderId}" btnTextKey="salesOrder.button.return" onclick="showReturnPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=completeOrder*">
							<probiz:iconBtn btnType="complete" id="complete${order.salesOrderId}" btnTextKey="salesOrder.button.complete" onclick="showCompletePanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
						<authorize:authorizeResource resourceString="/order/salesOrder/blank.html?doAction=cancelOrderByAdmin*">
							<probiz:iconBtn btnType="cancel" id="cancel${order.salesOrderId}" btnTextKey="salesOrder.button.cancelByAdmin" onclick="showCancelPanel(${order.salesOrderId})" disabled="yes"/>
						</authorize:authorizeResource>
					</div>
				</div>
			</div>
		</div>
		<div class="content">
			<div class="tab_02 clearfix">
				<div class="extra">
					<ul class="extra_wrap" id="detail${order.salesOrderId}">
						<li class="curr" id="tab1">
							<a href="javascript:void(0)"><fmt:message key="salesOrderView.tab.1"/></a>
						</li>
						<li id="tab2">
							<a href="javascript:void(0)"><fmt:message key="salesOrderView.tab.2"/></a>
						</li>
						<li id="tab3">
							<a href="javascript:void(0)"><fmt:message key="salesOrderView.tab.3"/></a>
						</li>
						<li id="tab4">
							<a href="javascript:void(0)"><fmt:message key="salesOrderView.tab.4"/></a>
						</li>
						<li id="tab5">
							<a href="javascript:void(0)"><fmt:message key="salesOrderView.tab.5"/></a>
						</li>
					</ul>
				</div>
				<div class="bt">
					<div class="bt_wrap">
						<div class="bg1" id="detail${order.salesOrderId}_tab1">
							<%@include file="orderItemBasic.jspf"%>
						</div>
						<div class="bg1" id="detail${order.salesOrderId}_tab2" style="display: none;">
							<%@include file="orderItemProductAndCustomer.jspf"%>
						</div>
						<div class="bg1" id="detail${order.salesOrderId}_tab3" style="display: none;">
							<%@include file="orderItemPayment.jspf"%>
						</div>
						<div class="bg1" id="detail${order.salesOrderId}_tab4" style="display: none;">
							<%@include file="orderItemShipment.jspf"%>
						</div>
						<div class="bg1" id="detail${order.salesOrderId}_tab5" style="display: none;">
							<%@include file="orderItemLog.jspf"%>
						</div>

					</div>
				</div>
			</div>
		</div>
	</div>
</td>

<script type="text/javascript">
$j(document).ready(function () {
	$j('#detail${order.salesOrderId} li').each(function(i,o){
		$j(o).bind("click",function(){
			debugger;
			$j('#detail${order.salesOrderId} li').each(function(i,o){
				$j(this).removeClass("curr");
				$j('#detail${order.salesOrderId}_'+this.id).hide();
			});
			$j(this).addClass("curr");
			$j('#detail${order.salesOrderId}_'+this.id).show();
			
		});
	});
	
	displayButtons(${order.salesOrderId},${order.orderStatus},${order.paymentStatus},${order.shipmentStatus},${order.isCanReturnMoney});
	applyValidate($j('#memo${order.salesOrderId}').get(0),"required,maxlength=1024");
});

</script>
